package com.home.web.gwt.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.home.web.gwt.shared.Contact;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: volyn
 * Date: 29.01.12
 * Time: 16:03
 * To change this template use File | Settings | File Templates.
 */
@RemoteServiceRelativePath("generator")
public interface GenService extends RemoteService {
    Integer generate();
    List<Contact> getContactList();
    /**
     * Utility/Convenience class.
     * Use GenService.App.getInstance() to access static instance of GenServiceAsync
     */
    public static class App {
        private static final GenServiceAsync ourInstance = (GenServiceAsync) GWT.create(GenService.class);

        public static GenServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
